#include "Brushes/RIVIABrushesMgr.h"

RIVIABrushesMgr *RIVIABrushesMgr::getInstance()
{
    static RIVIABrushesMgr mgr;
        return &mgr;
}

void RIVIABrushesMgr::addBrush(const QString &strBrushType, BrushesBase *pBrush)
{
    m_oBrushesmap.insert(strBrushType, pBrush);
}

BrushesBase *RIVIABrushesMgr::getCurBrush()
{
    QMap<QString, BrushesBase*>::iterator oIter;
    oIter = m_oBrushesmap.find(m_strCurBrushName);
    if(oIter != m_oBrushesmap.end())
        return oIter.value();
}

RIVIABrushesMgr::RIVIABrushesMgr() :
    m_strCurBrushName("Pixel")
{

}

RIVIABrushesMgr::~RIVIABrushesMgr()
{

}

void RIVIABrushesMgr::setCurBrushName(const QString &strCurBrushName)
{
    m_strCurBrushName = strCurBrushName;
}
